package arxiv;

import java.util.*;

/*
 * class to represent arXiv article
 */


public class Article {

    private String title;
    private List<String> authors;

    // getters and setters
    public String getTitle() {
        return this.title;
    }

    public List<String> getAuthors() {
        return this.authors;
    }

    public void setTitle(String mytitle) {
        this.title = mytitle;
    }

    public void setAuthors(List<String> myauthors) {
        this.authors = myauthors;
    }

    // output title and authors of article as a string
    public String display() {

        StringBuilder toDisplay = new StringBuilder();
        toDisplay.append("Title: ");
        toDisplay.append(getTitle());
        toDisplay.append("\n");

        toDisplay.append("Authors: ");
        toDisplay.append(getAuthors());
        toDisplay.append("\n");

        return toDisplay.toString();
    }

}
